﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/include/context.jsp"%>
<form action="${ctx}/warehouse/stock/save" method="post"
	style="margin: 0px;">
<input type="hidden" name="inventory.id" value="${inventory.id}">
<table cellspacing="0" cellpadding="0" class="form-grid">
	<tbody>
		<tr>
			<td style="text-align: right; padding-right: 3px; width: 30%;">选择仓库：</td>
			<td>
				<select name="inventory.warehouse.id">
					<c:forEach var="warehouse" items="${chooseWarehouse}" varStatus="status">
						<!--<c:if test="${!empty inventory && !empty inventory.warehouse && inventory.warehouse.id == warehouse.id} ">
							<option value="${warehouse.id}"  selected="selected"> ${warehouse.code } -  ${warehouse.name } </option>
						</c:if>
						
						<c:if test="${empty inventory || empty inventory.warehouse || inventory.warehouse.id != warehouse.id} ">
							<option value="${warehouse.id}"> ${warehouse.code } -  ${warehouse.name } </option>
						</c:if>
					-->
						<option value="${warehouse.id}"> ${warehouse.code } -  ${warehouse.name } </option>
					</c:forEach>
				</select>
			</td>
			<td style="text-align: right; padding-right: 3px; width: 30%;">选择产品：</td>
			<td>
				<select name="inventory.product.id">
					<c:forEach var="product" items="${chooseProduct}" varStatus="status">
						<!--<c:if test="${!empty inventory && !empty inventory.product && inventory.product.id == product.id} ">
							<option value="${product.id}" selected="selected"> ${product.productCode } -  ${product.productName } </option>
						</c:if>
						<c:if test="${empty inventory || !empty inventory.product || inventory.product.id != product.id} ">
							<option value="${product.id}"> ${product.productCode } -  ${product.productName } </option>
						</c:if>
					-->
						<option value="${product.id}"> ${product.productCode } -  ${product.productName } </option>
					</c:forEach>
				</select>
			</td>
		</tr>
		<tr>
			<td style="text-align: right; padding-right: 3px; width: 30%;">产品数量：</td>
			<td colspan="3"><input type="text" size="20" name ="inventory.amount" value="${inventory.amount}"/></td>

		</tr>
	</tbody>
</table>

<div class="window_footer"><input type="submit" value="确定"></div>
</form>

<%@ include file="/include/script.jsp"%>


